The present invention relates to a method and apparatus for checking errors in data. More particularly, the present invention pertains to a method and apparatus for checking data that is read from a recording medium such as a tape, a video tape, a CD and a DVD after error correction has been performed on the data.
FIG. 1 illustrates the format of a sector 1 of data stored in a recording medium, such as a DVD-ROM. The sector 1 includes a twelve byte ID and reserved area, a two kilobyte user data area and a four-byte error detecting code (EDC) area. The EDC area stores an error detecting code (EDC). The EDC is used to confirm whether an error correction of the data has been properly performed, or whether the data has been properly restored, by using an error correcting code (ECC). The EDC includes a cyclic redundancy check (CRC) data obtained by performing a cyclic redundancy check (CRC) arithmetic operation on the user data and the data stored in the ID and reserved area.
Each sector 1 includes twelve data byte groups. The first group includes the twelve byte ID and reserved area and one hundred sixty bytes of user data. The second to eleventh groups each include one hundred seventy two bytes of user data. The last group includes one hundred sixty eight bytes of user data and the EDC area, which is four bytes. FIG. 2 illustrates a data block 2, which includes sixteen sectors 1, a PO-ECC portion 3 and a PI-ECC portion 4. The PO-ECC portion 3 includes ECCs used for performing error correction on each of the sectors 1 along a PO direction (the column or vertical direction as viewed in FIG. 2). The PI-ECC part 4 includes ECCs used for performing error correction on each of the sectors 1 and the PO-ECC portion 3 along a PI direction (the row or horizontal direction as viewed in FIG. 2). Each row of data in the PI-ECC portion 4 and a corresponding row of data in the sectors 1 constitute a PI interleave. A column of data in the PO-ECC portion 3 and corresponding columns of data of the sectors 1 constitute a PO interleave.
FIG. 5 illustrates the format 2a of multiple data blocks 2 recorded on a DVD-ROM. The PO-ECC portion 3 and a part of the PI-ECC portion 4 that corresponds to the portion 3 are divided into sixteen interleaves. Each of the interleaves is inserted after one of the sectors 1. An error correcting circuit in an optical disk reading device performs an error correction on the data blocks 2 as they are read from the DVD-ROM.
More specifically, the error correcting circuit receives a PI interleave a byte at a time along the PI direction as illustrated in FIG. 3. The circuit then generates a PI error syndrome. Next, error information is generated from the one interleave PI error syndrome. The generated information contains the error position and the correction value of any erroneous data. The error correcting circuit corrects the error in the PI interleave using the error position and the correction value. The error correction is repeated for all of the PI interleaves.
The error correcting circuit also receives a PO interleave a byte at a time along the PO direction as illustrated in FIG. 4. The circuit then generates a PO error syndrome. Next, error information is generated from the PO error syndrome. The generated information contains the error position and the correction value of any erroneous data. The error correcting circuit corrects the error in the PO interleave using the error position and the correction value. The error correction is repeated for all of the PO interleaves.
The error correcting circuit further checks whether errors in the user data have been properly corrected, or evaluates the quality of the user data, by performing error detection, or a CRC check, in the PI and PO directions using the EDCs in the sectors 1. In performing the error detection, a CRC arithmetic operation is performed using one sector data of FIG. 1 (the ID and reserved area stored data, user data and the ECC) as base data. If the result of the CRC arithmetic operation is zero, the user data is judged to be free of errors. If there is an error in the user data, a result of the operation shows a value that corresponds to the error.
The error correcting circuit performs the CRC arithmetic operation using the basic data before performing error correction and temporarily stores the CRC operation result. The circuit then performs another CRC arithmetic operation using a correction value generated in the error correction step and compares the result of the first CRC arithmetic operation with the result of the second CRC arithmetic operation. If the results are equal, the error correction using the correction value is judged to be accurate.
In performing error detection for the error corrected data in the PI direction, a CRC arithmetic operation is performed using the basic data on the PI interleave. This CRC arithmetic operation is possible because the input direction of the basic data matches the input direction of data during the PI error correction, and the CRC data is generated in the order in which the basic data is input.
The CRC data is weighted along the PI direction, which prevents error detection from being performed in the PO direction. That is, the data inputting direction for PO error correction is perpendicular to the inputting direction of the basic data in the CRC arithmetic operation. Therefore, the error detection cannot be performed when the PO interleave is being input.
Currently, it is only suggested that error correction and detection (CRC check) are performed again after an error correction in the PO direction. In this manner, error detection for the error corrected data is performed in the Po direction. However, having to perform PI error correction twice increases the time for error detection. Particularly, access time to a buffer memory is increased in a DVD-ROM, in which each data block contains a large amount of data.
Accordingly, it is an objective of the present invention to provide an error checking method and an apparatus that decrease the time required to perform an error check.